import * as actionType from './constants.js';
import {reqComment} from '../../../api/index'

//主页数据

export const changeComment = (data) => {
    // console.log("进去成功...............");
    return {
        type: actionType.CHANGE_COMMENT,
        data: data
    }
}







export const getComment = (musicId,pageNo) =>{
    return (dispatch) =>{
        reqComment(musicId,pageNo)
            .then((res) =>{
                // console.log(res,'reqPersonalized');
                dispatch(changeComment(res.data.data))
            })
            .catch((e) =>{
                console.log(e,'error')
            })
    }

}


